---
sidebar_position: 1
toc_min_heading_level: 2
toc_max_heading_level: 2
---

# searchGroupMembers

## 功能介绍

:::info 说明

在用户 ID 或群昵称字段中，用关键词搜索某个群的群成员

:::

:::caution 注意

（1）群成员才有搜索权限；  
（2）至少需指定一个搜索域；  
（3）多个域之间是或的关系；

:::

<Tabs
groupId="sdks-language"
values={[
{ label: 'iOS', value: 'iOS', },
{ label: 'Android', value: 'Android', },
{ label: 'Flutter', value: 'Flutter', },
{ label: 'Uniapp', value: 'Uniapp', },
{ label: 'Web', value: 'Web', },
]
}>

<TabItem value="Flutter">

### 参数详解

</TabItem>

<TabItem value="iOS">

### 函数原型

```swift showLineNumbers

- (void)searchGroupMembers:(OIMSearchGroupMembersParam *)searchParam
                 onSuccess:(nullable OIMGroupMembersInfoCallback)onSuccess
                 onFailure:(nullable OIMFailureCallback)onFailure;

```

### 输入参数

| 参数名称    | 参数类型                                                                        | 是否必填 | 描述     |
| ----------- | ------------------------------------------------------------------------------- | -------- | -------- |
| searchParam | [OIMSearchGroupMembersParam](docs/sdks/Class/Group/SearchGroupMembersParam.mdx) | 是       | 查询参数 |

### 返回结果

| 参数名称  | 参数类型                                                                     | 描述     |
| --------- | ---------------------------------------------------------------------------- | -------- |
| onSuccess | NSArray< [OIMGroupMemberInfo](docs/sdks/Class/Group/GroupMemberInfo.mdx) \*> | 成功返回 |
| onFailure | [OIMFailureCallback](docs/sdks/Callback/onError.mdx)                         | 失败返回 |

### 代码示例

```swift showLineNumbers

OIMSearchGroupMembersParam *param = [OIMSearchGroupMembersParam new];
param.groupID = @"";
param.keywordList = @[];
param.offset = 0;
param.count = 20;

[OIMManager.manager searchGroupMembers:param
                              onSuccess:^(NSArray<OIMGroupMemberInfo *> * _Nullable groupMembersInfo) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];

```

</TabItem>

<TabItem value="Android">

### 参数详解

</TabItem>

<TabItem value="Web">

### 参数详解

</TabItem>

<TabItem value="Uniapp">

### 参数详解

### 返回模板

### 代码示例

</TabItem>

</Tabs>
